<?php
include "includeFiles.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $C['Title'];?></title>
<Link href="../uploadfile/ico/<?php echo $C['ICO'];?>" rel="Shortcut Icon">
<meta name="Keywords" content="<?php echo $C['Keywords'];?>">
<meta name="description" content="<?php echo $C['Description'];?>">
<Meta name="Copyright" Content="<?php echo $C['CopyRight'];?>">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $C['Title'];?></title>
<Link href="../uploadfile/ico/<?php echo $C['ICO'];?>" rel="Shortcut Icon">
<meta name="Keywords" content="<?php echo $C['Keywords'];?>">
<meta name="description" content="<?php echo $C['Description'];?>">
<Meta name="Copyright" Content="<?php echo $C['CopyRight'];?>">
<link href="css/css.css" rel="stylesheet" type="text/css" />
<link charset="utf-8" rel="stylesheet" href="css/alipay.css">
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="jquery-1.8.3.min.js"></script>
<script type="text/javascript">
<!--

$(document).ready(function(){
	//$(".mh_zx_ct:gt(0)").hide();
	var opt=$(".mh_zx_box ul li");
	opt.hover(function(){
		//alert($(this));
		$(this).addClass('one').siblings().removeClass('one');
		var opt_index=opt.index(this);
		$(".mh_zx_ct").eq(opt_index).show().siblings().hide();
	});
	$(".nav_green").mouseover(function(){
		$("#nav_more").show();
	}).mouseout(function(){
		var timer=window.setTimeout(function(){
			$("#nav_more").hide();	
		},1000)
		$(".nav_green li").mouseover(function(){
			window.clearTimeout(timer);
			//$("#nav_more").show();
		})
	})
	$(".nav_green li").mouseout(function(){
		$("#nav_more").hide();	
	})

});
//-->
</script> 
</head>
<body id="mainbody">
<?php include_once('header.php');?>

<!--主体布局-->
<div class="main">
  <div class="sc_box">
    <ul class="Position">
      <li class="w">1 查看购物车555</li>
      <li>2 确认订单信息</li>
      <li>3 成功提交订单</li>
    </ul>
    <div class="Position_r"> 商品价格和库存请以订单提交时为准</div>
    <div class="clr"> </div>
  </div>
  <!--商品售完提示-->
  <div class="sc_box" id="notify_a" style="display: none;">
    <div class="notify_ii" id="notify_b"> 抱歉！有商品已售空，暂时不能购买。<b id="notify_close"><img alt="" src="arr_u.gif"></b></div>
    <div class="notify_listBox" id="notify_d">
      <p>已售空不能购买的商品将在您结算时自动删除 <a href="javascript:void(0);" id="i_know">我知道了</a></p>
    </div>
  </div>
  <div class="clr"> </div>
  <!--我购买的商品-->
  <div class="sc_box" id="myshopcar" style="">
    <div class="my_shop_t">
      <div class="t" title="我购买的商品"> </div>
      <span class="fl">共<span id="productcount">1</span>件</span>
      <div id="login_i" class="shopcart_login"><!--<a href="#"></a>登录后保存您的购物清单--></div>
      <span class="fr" id="transferinfoview">您目前没有可享受的优惠</span> </div>
    <div class="my_shop"> 
      <!--我的购物车标题行-->
      <ul>
        <li class="n">商品名称</li>
        <li class="w200">所获积分</li>
        <li class="w201">价格</li>
        <li class="w202">下单时间</li>
      </ul>
      <div id="productlistview">
        <div class="fahuo_title"><strong>购买商品列表</strong></div>
          <?
			 $result =  $info->getCartList();
			 if($result){
			  foreach($result as $key=>$value){
			  ?>
        <div class="listBox <?php if($key % 2 == 0) echo 'gray';?>">
          <div class="i">
            	<?php	$vals=$info->getProOne($value['productID']);?>
                <a href="#" onclick="viewnum(<?=$value['id'];?>);">
           <img style="border: 1px solid rgb(237, 237, 237); margin: 1px;" src="uploadfile/product_b/<?=$vals[0]['Photos']?>" onerror="javascript:this.src='images/pro2_10.jpg'"  />
                </a>
          </div>
          <dt><?=$value['productName']?><br />  
            <?=$value['SubName']?>  <a href="?delid=<?=$value['productID']?>&action=delcarts">删除该产品?</a>
          <dd class="w200"><? echo $value['price'];?></dd>
          <dd class="w170"><? echo $price = $value['price']; $totalprice[] = $value['price'];?></dd>
          <dd class="w170"><?=date("Y-m-d",$value['createdate'])?></dd>
          <div class="clr" style="clear:both"></div>
        </div>
        <div  style="width:757px;word-break:break-all; display:none; "  id="v<?=$value['id'];?>">
        完整50个号码<br/>
           <? 
		echo   $note = $vals[0]['Note'];
					
		   ?>
        </div>
        <? }}?>
        
        
        
      </div>
      <!--购物操作-->
      <div class="total">
        <div class="fr"> 优惠金额：<em>￥</em><b id="pdiscount">0.00</b> &nbsp;&nbsp;商品金额总计：<em>￥</em><b id="productprice"><?=@array_sum($totalprice);?></b> </div>
        <div class="clr"> </div>
      </div>
      <div class="NextStep_box">
        <div class="empty"> <a href="?action=delcart">清空购物车</a>
          <div class="delcommodity" id="emptyDiv" style="left: -10px; top: -66px;"> 您确定要清空吗？<br>
            <a href="javascript:clearcart();">确定</a>&nbsp;&nbsp;<a href="javascript:void(0);">取消</a></div>
        </div>
        <div class="fr"> <a href="index.php" title="继续购物" class="shoping"> </a>
        <a href="javascript:;" title="去结算" class="pay" id="jiesuanBtn" onclick="abc()"></a> </div>
        <script language="javascript">
             function viewnum(a){
				   $('#v'+a).toggle();
				 }
	    
			function abc(){
				 if(confirm(' \n是否确认付款（你的余额:<?php  $a = $info->memberMsg(); echo $a['money'];?>）')){
					 <?php if($total > $a['money']){?>
					 alert('你的余额不足请充值！');
					 location.href='memberchongji.php';
					 <? }else{?>
					location.href='forpay.php?prid=<?=$_GET['prid']?>&cityid=<?=$cityid?>';
					<? }?>
				  }else{
					  alert('取消成功！');
					  return false;
				  }
			}

		</script> 

        <div class="gehang"></div>
      </div>
    </div>
  </div>
  <div class="gehang"></div>
  <div style="width:980px;height:100%;overflow:hidden;margin-top:10px"> <img src="images/copy_line.jpg" /><br />
    <br />
    <br />
    <img src="images/copy.jpg" />
    <?php include_once('help.php');?>
    <img src="images/copy_line.jpg" /> </div>
</div>
<!--#主体布局-->

<div class="clear"></div>
<?php include_once('footer.php');?>
</body>
</html>
